package asn.match.model;

// Generated 15 juin 2014 03:03:18 by Hibernate Tools 4.0.0

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Like generated by hbm2java
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "like", catalog = "muslima_sphere")
public class Like implements java.io.Serializable {

	private Integer idLike;
	private Ressource ressource;
	private String opinion;
	private String status;
	private Date createdAt;
	private Date modifiedAt;

	public Like() {
	}

	public Like(Ressource ressource, String opinion, String status,
			Date createdAt, Date modifiedAt) {
		this.ressource = ressource;
		this.opinion = opinion;
		this.status = status;
		this.createdAt = createdAt;
		this.modifiedAt = modifiedAt;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_like", unique = true, nullable = false)
	public Integer getIdLike() {
		return this.idLike;
	}

	public void setIdLike(Integer idLike) {
		this.idLike = idLike;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ressource_id", nullable = false)
	public Ressource getRessource() {
		return this.ressource;
	}

	public void setRessource(Ressource ressource) {
		this.ressource = ressource;
	}

	@Column(name = "opinion", nullable = false, length = 10)
	public String getOpinion() {
		return this.opinion;
	}

	public void setOpinion(String opinion) {
		this.opinion = opinion;
	}

	@Column(name = "status", nullable = false, length = 8)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_at", nullable = false, length = 19)
	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "modified_at", nullable = false, length = 19)
	public Date getModifiedAt() {
		return this.modifiedAt;
	}

	public void setModifiedAt(Date modifiedAt) {
		this.modifiedAt = modifiedAt;
	}

}
